package com.dms.common.exception;

import com.dms.common.api.IErrorCode;

public enum C2CErrorCode implements IErrorCode {
    
    PRODUCT_NOT_FOUND(404, "商品不存在"),
    PRODUCT_NO_PERMISSION(403, "无权限操作此商品"),
    PRODUCT_ALREADY_SOLD(400, "商品已售出"),
    TRANSACTION_NOT_FOUND(404, "交易不存在"),
    TRANSACTION_NO_PERMISSION(403, "无权限操作此交易"),
    COMMENT_NOT_FOUND(404, "评论不存在"),
    COMMENT_NO_PERMISSION(403, "无权限操作此评论"),
    MESSAGE_NOT_FOUND(404, "消息不存在"),
    MESSAGE_NO_PERMISSION(403, "无权限操作此消息");
    
    private Integer code;
    private String message;
    
    C2CErrorCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
    
    @Override
    public Integer getCode() {
        return code;
    }
    
    @Override
    public String getMessage() {
        return message;
    }
} 